package cn.kgc.util;


import java.text.SimpleDateFormat;
import java.util.Date;

public class TokenUtil {
    public static String getToken(String from,Date date,String userCode,long id,int length,boolean flag){
        SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmss");
        String token="token:"+from+"-"+MD5Utils.encodeStr(userCode)+"-"+id+"-"+sdf.format(date)+"-"+ UUIDUtil.getStr(length,flag);
        return token;
    }
}
